package com.mgs.admin.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mgs.admin.api.dto.UserDTO;
import com.mgs.admin.api.dto.UserInfo;
import com.mgs.admin.api.entity.User;
import com.mgs.admin.mapper.UserMapper;
import com.mgs.admin.service.UserService;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author zhanglei
 * @Date 2021/12/16 17:40
 * @Version 1.0
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Override
    public UserInfo getUserInfo(User user) {
        UserInfo userInfo = new UserInfo();
        userInfo.setUser(user);
        return userInfo;
    }

    @Override
    public IPage getUserPage(Page page, UserDTO userDTO) {
        return baseMapper.getUserVosPage(page, userDTO);
    }
}
